/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_prod_offer_his.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_PROD_OFFER_HIS
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_prod_offer_his.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h"

CTable_PPM_PROD_OFFER_HIS::CTable_PPM_PROD_OFFER_HIS( )
 :NPCRecordSet( )
{
  setTableName( "PPM_PROD_OFFER_HIS" );
  prepareTable();
  prepareQuery();
 
  HIS_ID.setField( "HIS_ID", DATA_CHAR, 20, 1 );
  makeTableItem( HIS_ID );
  makeKeyItem( HIS_ID ); 
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  PROD_OFFER_ID.setField( "PROD_OFFER_ID", DATA_DOUBLE, 22, 2 );
  makeTableItem( PROD_OFFER_ID );
  makeKeyItem(PROD_OFFER_ID);
  FEE_SET_FLAG.setField( "FEE_SET_FLAG", DATA_CHAR, 6, 0 );
  makeTableItem( FEE_SET_FLAG );
  PROD_OFFER_NAME.setField( "PROD_OFFER_NAME", DATA_CHAR, 512, 0 );
  makeTableItem( PROD_OFFER_NAME );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  PROD_OFFER_PUBLISHER.setField( "PROD_OFFER_PUBLISHER", DATA_CHAR, 128, 0 );
  makeTableItem( PROD_OFFER_PUBLISHER );
  STATE.setField( "STATE", DATA_CHAR, 6, 0 );
  makeTableItem( STATE );
  EFF_DATE.setField( "EFF_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EFF_DATE );
  EXP_DATE.setField( "EXP_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EXP_DATE );
  MANAGE_GRADE.setField( "MANAGE_GRADE", DATA_CHAR, 32, 0 );
  makeTableItem( MANAGE_GRADE );
  OFFER_NBR.setField( "OFFER_NBR", DATA_CHAR, 128, 0 );
  makeTableItem( OFFER_NBR );
  DIRECTION.setField( "DIRECTION", DATA_CHAR, 256, 0 );
  makeTableItem( DIRECTION );
  CUST_GROUOP.setField( "CUST_GROUOP", DATA_CHAR, 512, 0 );
  makeTableItem( CUST_GROUOP );
  OFFER_PROVIDER_ID.setField( "OFFER_PROVIDER_ID", DATA_CHAR, 30, 0 );
  makeTableItem( OFFER_PROVIDER_ID );
  BRAND_ID.setField( "BRAND_ID", DATA_CHAR, 30, 0 );
  makeTableItem( BRAND_ID );
  SERV_BRAND_ID.setField( "SERV_BRAND_ID", DATA_CHAR, 30, 0 );
  makeTableItem( SERV_BRAND_ID );
  TEMPLET_ID.setField( "TEMPLET_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( TEMPLET_ID );
  DEFAULT_TIME_PERIOD.setField( "DEFAULT_TIME_PERIOD", DATA_DOUBLE, 22, 0 );
  makeTableItem( DEFAULT_TIME_PERIOD );
  APP_STATE.setField( "APP_STATE", DATA_CHAR, 20, 0 );
  makeTableItem( APP_STATE );
  AREA_ID.setField( "AREA_ID", DATA_CHAR, 1000, 0 );
  makeTableItem( AREA_ID );
  MDSE_TYPE.setField( "MDSE_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( MDSE_TYPE );
  DATES.setField("DATES" , DATA_CHAR , 20 , 0 );
  makeTableItem( DATES );
  DATAUNIT.setField("DATAUNIT" , DATA_CHAR , 20 , 0 );
  makeTableItem( DATAUNIT );
  REMARK.setField("REMARK" , DATA_CHAR , 1024 , 0);
  makeTableItem(REMARK);
  SINGLE_BUY_FLAG.setField("SINGLE_BUY_FLAG" , DATA_CHAR , 6 , 0);
  makeTableItem(SINGLE_BUY_FLAG);
  GROUP_OFFER_ID.setField("GROUP_OFFER_ID",DATA_CHAR,20,0);
  makeTableItem(GROUP_OFFER_ID);
  REVISION.setField("REVISION",DATA_CHAR,20,0);
  makeTableItem(REVISION);
  CREATE_DATE.setField("CREATE_DATE",DATA_DATETIME,7,0);
  makeTableItem(CREATE_DATE);
  STAFF.setField("STAFF",DATA_CHAR,20,0);
  makeTableItem(STAFF);
  INTERNAL_ID.setField("INTERNAL_ID",DATA_CHAR,20,0);
  makeTableItem(INTERNAL_ID);
  INTERNAL_CODE.setField("INTERNAL_CODE",DATA_CHAR,20,0);
  makeTableItem(INTERNAL_CODE);
  SUB_BRAND.setField("SUB_BRAND",DATA_CHAR,20,0);
  makeTableItem(SUB_BRAND);
  SALE_NAME.setField( "SALE_NAME", DATA_CHAR, 512, 0 );
  makeTableItem( SALE_NAME );
  EFFECTIVE_TYPE.setField("EFFECTIVE_TYPE",DATA_CHAR,3,0);
  makeTableItem(EFFECTIVE_TYPE);
  EXPIRE_TYPE.setField("EXPIRE_TYPE",DATA_CHAR,3,0);
  makeTableItem(EXPIRE_TYPE);
	SCOPE.setField( "SCOPE", DATA_CHAR, 3, 0 );
  makeTableItem( SCOPE );
  CHARGING_POLICY_CN.setField( "CHARGING_POLICY_CN", DATA_CHAR, 3, 0 );
  makeTableItem( CHARGING_POLICY_CN );
}


CTable_PPM_PROD_OFFER_HIS::CTable_PPM_PROD_OFFER_HIS( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_PROD_OFFER_HIS" );
  prepareTable();
  prepareQuery();
 
  HIS_ID.setField( "HIS_ID", DATA_CHAR, 20, 1 );
  makeTableItem( HIS_ID );
  makeKeyItem( HIS_ID ); 
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  PROD_OFFER_ID.setField( "PROD_OFFER_ID", DATA_DOUBLE, 22, 2 );
  makeTableItem( PROD_OFFER_ID );
  makeKeyItem(PROD_OFFER_ID);
  FEE_SET_FLAG.setField( "FEE_SET_FLAG", DATA_CHAR, 6, 0 );
  makeTableItem( FEE_SET_FLAG );
  PROD_OFFER_NAME.setField( "PROD_OFFER_NAME", DATA_CHAR, 512, 0 );
  makeTableItem( PROD_OFFER_NAME );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  PROD_OFFER_PUBLISHER.setField( "PROD_OFFER_PUBLISHER", DATA_CHAR, 128, 0 );
  makeTableItem( PROD_OFFER_PUBLISHER );
  STATE.setField( "STATE", DATA_CHAR, 6, 0 );
  makeTableItem( STATE );
  EFF_DATE.setField( "EFF_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EFF_DATE );
  EXP_DATE.setField( "EXP_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EXP_DATE );
  MANAGE_GRADE.setField( "MANAGE_GRADE", DATA_CHAR, 32, 0 );
  makeTableItem( MANAGE_GRADE );
  OFFER_NBR.setField( "OFFER_NBR", DATA_CHAR, 128, 0 );
  makeTableItem( OFFER_NBR );
  DIRECTION.setField( "DIRECTION", DATA_CHAR, 256, 0 );
  makeTableItem( DIRECTION );
  CUST_GROUOP.setField( "CUST_GROUOP", DATA_CHAR, 512, 0 );
  makeTableItem( CUST_GROUOP );
  OFFER_PROVIDER_ID.setField( "OFFER_PROVIDER_ID", DATA_CHAR, 30, 0 );
  makeTableItem( OFFER_PROVIDER_ID );
  BRAND_ID.setField( "BRAND_ID", DATA_CHAR, 30, 0 );
  makeTableItem( BRAND_ID );
  SERV_BRAND_ID.setField( "SERV_BRAND_ID", DATA_CHAR, 30, 0 );
  makeTableItem( SERV_BRAND_ID );
  TEMPLET_ID.setField( "TEMPLET_ID", DATA_DOUBLE, 22, 0 );
  makeTableItem( TEMPLET_ID );
  DEFAULT_TIME_PERIOD.setField( "DEFAULT_TIME_PERIOD", DATA_DOUBLE, 22, 0 );
  makeTableItem( DEFAULT_TIME_PERIOD );
  APP_STATE.setField( "APP_STATE", DATA_CHAR, 20, 0 );
  makeTableItem( APP_STATE );
  AREA_ID.setField( "AREA_ID", DATA_CHAR, 1000, 0 );
  makeTableItem( AREA_ID );
  MDSE_TYPE.setField( "MDSE_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( MDSE_TYPE );
  DATES.setField("DATES" , DATA_CHAR , 20 , 0 );
  makeTableItem( DATES );
  DATAUNIT.setField("DATAUNIT" , DATA_CHAR , 20 , 0 );
  makeTableItem( DATAUNIT );
  REMARK.setField("REMARK" , DATA_CHAR , 1024 , 0);
  makeTableItem(REMARK);
  SINGLE_BUY_FLAG.setField("SINGLE_BUY_FLAG" , DATA_CHAR , 6 , 0);
  makeTableItem(SINGLE_BUY_FLAG);
  GROUP_OFFER_ID.setField("GROUP_OFFER_ID",DATA_CHAR,20,0);
  makeTableItem(GROUP_OFFER_ID);
  REVISION.setField("REVISION",DATA_CHAR,20,0);
  makeTableItem(REVISION);
  CREATE_DATE.setField("CREATE_DATE",DATA_DATETIME,7,0);
  makeTableItem(CREATE_DATE);
  STAFF.setField("STAFF",DATA_CHAR,20,0);
  makeTableItem(STAFF);
  INTERNAL_ID.setField("INTERNAL_ID",DATA_CHAR,20,0);
  makeTableItem(INTERNAL_ID);
  INTERNAL_CODE.setField("INTERNAL_CODE",DATA_CHAR,20,0);
  makeTableItem(INTERNAL_CODE);
  SUB_BRAND.setField("SUB_BRAND",DATA_CHAR,20,0);
  makeTableItem(SUB_BRAND);
  SALE_NAME.setField( "SALE_NAME", DATA_CHAR, 512, 0 );
  makeTableItem( SALE_NAME );
  EFFECTIVE_TYPE.setField("EFFECTIVE_TYPE",DATA_CHAR,3,0);
  makeTableItem(EFFECTIVE_TYPE);
  EXPIRE_TYPE.setField("EXPIRE_TYPE",DATA_CHAR,3,0);
  makeTableItem(EXPIRE_TYPE);
	SCOPE.setField( "SCOPE", DATA_CHAR, 3, 0 );
  makeTableItem( SCOPE );
  CHARGING_POLICY_CN.setField( "CHARGING_POLICY_CN", DATA_CHAR, 3, 0 );
  makeTableItem( CHARGING_POLICY_CN );
}

CTable_PPM_PROD_OFFER_HIS::~CTable_PPM_PROD_OFFER_HIS( )
{
    close();
}

